package com.linkq.ipinyin.model;

import lombok.Data;

import java.util.List;

/**
 * @author wangpeng
 * @since 2025-06-29
 **/

@Data
public class IOSSubscriptionNotification {
    private String notificationType;
    private String notificationVersion;
    private String autoRenewProductId;
    private boolean autoRenewStatus;
    private String environment;
    private String password;
    private String bid;
    private String bvrs;
    private String latestReceipt;
    private List<ReceiptInfo> latestReceiptInfo;
    private String latestExpiredReceipt;
    private List<ReceiptInfo> latestExpiredReceiptInfo;
    private Integer expirationIntent;
    private Long purchaseDateMs;
    private Long expiresDateMs;
    private Long cancellationDateMs;
    private String originalTransactionId;
    private String transactionId;
    private String webOrderLineItemId;
    private String receipt;
    private String transaction_id;

    @Data
    static
    class ReceiptInfo {
        private String productId;
        private String transactionId;
        private String originalTransactionId;
        private Long purchaseDateMs;
        private Long expiresDateMs;
        private Long cancellationDateMs;
        private String cancellationReason;
    }
}
